home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / gnu / djgpp / contrib / dvx / inc / x11 / intrinsp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-15  |  9.0 KB  |  318 lines

  1. /*
  2. * $XConsortium: IntrinsicP.h,v 1.49 90/04/03 09:58:50 swick Exp $
  3. * $oHeader: IntrinsicP.h,v 1.4 88/08/26 14:49:52 asente Exp $
  4. */
  5.  
  6. /***********************************************************
  7. Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
  8. and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
  9.  
  10.                         All Rights Reserved
  11.  
  12. Permission to use, copy, modify, and distribute this software and its 
  13. documentation for any purpose and without fee is hereby granted, 
  14. provided that the above copyright notice appear in all copies and that
  15. both that copyright notice and this permission notice appear in 
  16. supporting documentation, and that the names of Digital or MIT not be
  17. used in advertising or publicity pertaining to distribution of the
  18. software without specific, written prior permission.  
  19.  
  20. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  21. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  22. DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  23. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  24. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  25. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  26. SOFTWARE.
  27.  
  28. ******************************************************************/
  29.  
  30. #ifndef _XtintrinsicP_h
  31. #define _XtintrinsicP_h
  32.  
  33. #include <X11/Intrinsic.h>
  34.  
  35. typedef struct _XrmResource { /* Added Tag. POHC 91/01/16 */
  36.     XrmQuark    xrm_name;      /* Resource name quark        */
  37.     XrmQuark    xrm_class;      /* Resource class quark        */
  38.     XrmQuark    xrm_type;      /* Resource representation type quark */
  39.     Cardinal    xrm_size;      /* Size in bytes of representation    */
  40.     XrmQuark    xrm_offset;      /* -offset-1                */
  41. /*  ^^^^^^^^ Was long int. POHC 91/04/04 */
  42.     XrmQuark    xrm_default_type; /* Default representation type quark    */
  43.     XtPointer    xrm_default_addr; /* Default resource address        */
  44. } XrmResource, *XrmResourceList;
  45.  
  46. typedef unsigned long XtVersionType;
  47.  
  48. #define XT_VERSION 11
  49. #ifndef XT_REVISION
  50. #define XT_REVISION 4
  51. #endif
  52. #define XtVersion (XT_VERSION * 1000 + XT_REVISION)
  53. #define XtVersionDontCheck 0
  54.  
  55. typedef void (*XtProc)(
  56. #if NeedFunctionPrototypes
  57.     void
  58. #endif
  59. );
  60.  
  61. typedef void (*XtWidgetClassProc)(
  62. #if NeedFunctionPrototypes
  63.     WidgetClass /* class */
  64. #endif
  65. );
  66.  
  67. typedef void (*XtWidgetProc)(
  68. #if (NeedFunctionPrototypes || NeedFunctionPtrPrototypes) /* POHC 91/04/05 */
  69.     Widget    /* widget */
  70. #endif
  71. );
  72.  
  73. typedef Boolean (*XtAcceptFocusProc)(
  74. #if (NeedFunctionPrototypes || NeedFunctionPtrPrototypes) /* POHC 91/04/05 */
  75.     Widget    /* widget */,
  76.     Time*    /* time */
  77. #endif
  78. );
  79.  
  80. typedef void (*XtArgsProc)(
  81. #if NeedFunctionPrototypes
  82.     Widget    /* widget */,
  83.     ArgList    /* args */,
  84.     Cardinal*    /* num_args */
  85. #endif
  86. );
  87.  
  88. typedef void (*XtInitProc)(
  89. #if NeedFunctionPrototypes
  90.     Widget    /* request */,
  91.     Widget    /* new */,
  92.     ArgList    /* args */,
  93.     Cardinal*    /* num_args */
  94. #endif
  95. );
  96.  
  97. typedef Boolean (*XtSetValuesFunc)(
  98. #if NeedFunctionPrototypes
  99.     Widget     /* old */,
  100.     Widget     /* request */,
  101.     Widget     /* new */,
  102.     ArgList     /* args */,
  103.     Cardinal*    /* num_args */
  104. #endif
  105. );
  106.  
  107. typedef Boolean (*XtArgsFunc)(
  108. #if NeedFunctionPrototypes
  109.     Widget    /* widget */,
  110.     ArgList    /* args */,
  111.     Cardinal*    /* num_args */
  112. #endif
  113. );
  114.  
  115. typedef void (*XtAlmostProc)(
  116. #if NeedFunctionPrototypes
  117.     Widget        /* old */,
  118.     Widget        /* new */,
  119.     XtWidgetGeometry*    /* request */,
  120.     XtWidgetGeometry*    /* reply */
  121. #endif
  122. );
  123.  
  124. typedef void (*XtExposeProc)(
  125. #if (NeedFunctionPrototypes || NeedFunctionPtrPrototypes) /* POHC 91/04/05 */
  126.     Widget    /* widget */,
  127.     XEvent*    /* event */,
  128.     Region    /* region */
  129. #endif
  130. );
  131.  
  132. /* compress_exposure options*/
  133. #define XtExposeNoCompress        ((XtEnum)False)
  134. #define XtExposeCompressSeries        ((XtEnum)True)
  135. #define XtExposeCompressMultiple    2
  136. #define XtExposeCompressMaximal        3
  137.  
  138. /* modifiers */
  139. #define XtExposeGraphicsExpose          0x10
  140. #define XtExposeGraphicsExposeMerged    0x20
  141. #define XtExposeNoExpose          0x40
  142.  
  143.  
  144. typedef void (*XtRealizeProc)(
  145. #if (NeedFunctionPrototypes || NeedFunctionPtrPrototypes) /* POHC 91/04/05 */
  146.     Widget           /* widget */,
  147.     XtValueMask*       /* mask */,
  148.     XSetWindowAttributes* /* attributes */
  149. #endif
  150. );
  151.  
  152. typedef void (*XtCreatePopupChildProc)(
  153. #if NeedFunctionPrototypes
  154.     Widget    /* shell */
  155. #endif
  156. );
  157.  
  158. typedef XtGeometryResult (*XtGeometryHandler)(
  159. #if (NeedFunctionPrototypes || NeedFunctionPtrPrototypes) /* POHC 91/04/05 */
  160.     Widget        /* widget */,
  161.     XtWidgetGeometry*    /* request */,
  162.     XtWidgetGeometry*    /* reply */
  163. #endif
  164. );
  165.  
  166. typedef void (*XtStringProc)(
  167. #if NeedFunctionPrototypes
  168.     Widget    /* widget */,
  169.     String    /* str */
  170. #endif
  171. );
  172.  
  173. typedef struct _StateRec *StatePtr;
  174.  
  175. typedef struct _XtTMRec {
  176.     XtTranslations  translations;    /* private to Translation Manager    */
  177.     XtBoundActions  proc_table;        /* procedure bindings for actions    */
  178.     StatePtr        current_state;      /* Translation Manager state ptr     */
  179.     unsigned long   lastEventTime;
  180. } XtTMRec, *XtTM;
  181.  
  182. #include <X11/CoreP.h>
  183. #include <X11/ComposiP.h> /* Shortened X11/CompositeP.h POHC 90/10/21 */
  184. #include <X11/ConstraP.h> /* Shortened X11/ConstrainP.h POHC 90/10/21 */
  185. #include <X11/ObjectP.h>
  186. #include <X11/RectObjP.h>
  187.  
  188. #define XtDisplay(widget)    DisplayOfScreen((widget)->core.screen)
  189. #define XtScreen(widget)    ((widget)->core.screen)
  190. #define XtWindow(widget)    ((widget)->core.window)
  191.  
  192. #define XtClass(widget)        ((widget)->core.widget_class)
  193. #define XtSuperclass(widget)    (XtClass(widget)->core_class.superclass)
  194. #define XtIsRealized(object)    (XtWindowOfObject(object) != (Window) NULL) /* Added Window. 92/05/28 */
  195. #define XtParent(widget)    ((widget)->core.parent)
  196.  
  197. #undef XtIsRectObj
  198. #define XtIsRectObj(obj) \
  199.     (((Object)obj)->object.widget_class->core_class.class_inited & 0x02)
  200.  
  201. #undef XtIsWidget
  202. #define XtIsWidget(obj) \
  203.     (((Object)obj)->object.widget_class->core_class.class_inited & 0x04)
  204.  
  205. #undef XtIsComposite
  206. #define XtIsComposite(obj) \
  207.     (((Object)obj)->object.widget_class->core_class.class_inited & 0x08)
  208.  
  209. #undef XtIsConstraint
  210. #define XtIsConstraint(obj) \
  211.     (((Object)obj)->object.widget_class->core_class.class_inited & 0x10)
  212.  
  213. #undef XtIsShell
  214. #define XtIsShell(obj) \
  215.     (((Object)obj)->object.widget_class->core_class.class_inited & 0x20)
  216.  
  217. #undef XtIsWMShell
  218. #define XtIsWMShell(obj) \
  219.     (((Object)obj)->object.widget_class->core_class.class_inited & 0x40)
  220.  
  221. #undef XtIsTopLevelShell
  222. #define XtIsTopLevelShell(obj) \
  223.     (((Object)obj)->object.widget_class->core_class.class_inited & 0x80)
  224.  
  225. #ifdef DEBUG
  226. #define XtCheckSubclass(w, widget_class_ptr, message)    \
  227.     if (!XtIsSubclass((w), (widget_class_ptr))) {    \
  228.         String params[3];                \
  229.         Cardinal num_params = 3;            \
  230.         params[0] = (w)->core.widget_class->core_class.class_name;         \
  231.         params[1] = (widget_class_ptr)->core_class.class_name;         \
  232.         params[2] = (message);                         \
  233.         XtAppErrorMsg(XtWidgetToApplicationContext(w),             \
  234.             "subclassMismatch", "xtCheckSubclass", "XtToolkitError", \
  235.             "Widget class %s found when subclass of %s expected: %s",\
  236.             params, &num_params);        \
  237.     }
  238. #else
  239. #define XtCheckSubclass(w, widget_class, message)    /* nothing */
  240. #endif
  241.  
  242. #ifdef __cplusplus            /* do not leave open across includes */
  243. extern "C" {                /* for C++ V2.0 */
  244. #endif
  245.  
  246. #if NeedWidePrototypes
  247. #define Boolean        int
  248. #define Dimension    int
  249. #define KeyCode        int
  250. #define Position    int
  251. #define XtEnum        int
  252. #endif /* NeedWidePrototypes */
  253.  
  254. extern Widget _XtWindowedAncestor( /* internal; implementation-dependent */
  255. #if NeedFunctionPrototypes
  256.     Widget         /* object */
  257. #endif /* NeedFunctionPrototypes */
  258. );
  259.  
  260. extern void _XtInherit(
  261. #if NeedFunctionPrototypes
  262.     void
  263. #endif /* NeedFunctionPrototypes */
  264. );
  265.  
  266. extern void XtCreateWindow(
  267. #if NeedFunctionPrototypes
  268.     Widget         /* widget */,
  269.     unsigned int     /* windowClass */,
  270.     Visual*        /* visual */,
  271.     Mask         /* valueMask */,
  272.     XSetWindowAttributes* /* attributes */
  273. #endif /* NeedFunctionPrototypes */
  274. );
  275.  
  276. extern void XtResizeWidget(
  277. #if NeedFunctionPrototypes
  278.     Widget         /* widget */,
  279.     Dimension        /* width */,
  280.     Dimension        /* height */,
  281.     Dimension         /* borderWidth */
  282. #endif /* NeedFunctionPrototypes */
  283. );
  284.  
  285. extern void XtMoveWidget(
  286. #if NeedFunctionPrototypes
  287.     Widget         /* widget */,
  288.     Position        /* x */,
  289.     Position         /* y */
  290. #endif /* NeedFunctionPrototypes */
  291. );
  292.  
  293. extern void XtConfigureWidget(
  294. #if NeedFunctionPrototypes
  295.     Widget         /* widget */,
  296.     Position        /* x */,
  297.     Position         /* y */,
  298.     Dimension         /* width */,
  299.     Dimension        /* height */,
  300.     Dimension         /* borderWidth */
  301. #endif /* NeedFunctionPrototypes */
  302. );
  303.  
  304. #ifdef __cplusplus
  305. }                        /* for C++ V2.0 */
  306. #endif
  307.  
  308. #if NeedWidePrototypes
  309. #undef Boolean
  310. #undef Dimension
  311. #undef KeyCode
  312. #undef Position
  313. #undef XtEnum
  314. #endif /* NeedWidePrototypes */
  315.  
  316. #endif /* _XtIntrinsicP_h */
  317. /* DON'T ADD STUFF AFTER THIS #endif */
  318.